<script setup>
import { ref } from 'vue'

const projectInfo = ref({
  name: 'SPZX Admin',
  version: '1.0.0',
  description: 'Vue 3 Element Plus 管理系统',
  author: 'SPZX Team'
})

const features = ref([
  { id: 1, name: 'Vue 3', description: '基于最新的 Vue 3 框架构建' },
  { id: 2, name: 'Element Plus', description: '使用 Element Plus UI 组件库' },
  { id: 3, name: 'Vue Router', description: '强大的路由管理' },
  { id: 4, name: 'Pinia', description: '现代化的状态管理' },
  { id: 5, name: 'Axios', description: 'HTTP 请求客户端' },
  { id: 6, name: 'Tailwind CSS', description: '实用工具优先的 CSS 框架' }
])
</script>

<template>
  <div class="about-container">
    <header class="about-header">
      <h1 class="text-3xl font-bold text-primary mb-2">关于项目</h1>
      <p class="text-gray-600">这是一个基于 Vue 3 + Element Plus 的管理系统框架</p>
    </header>

    <div class="about-content mt-8">
      <ElCard class="mb-6">
        <template #header>
          <div class="card-header">
            <span class="text-lg font-semibold">项目信息</span>
          </div>
        </template>
        
        <div class="card-content">
          <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
            <div class="flex items-center">
              <span class="w-24 text-gray-500">项目名称：</span>
              <span class="font-medium">{{ projectInfo.name }}</span>
            </div>
            <div class="flex items-center">
              <span class="w-24 text-gray-500">版本号：</span>
              <span>{{ projectInfo.version }}</span>
            </div>
            <div class="flex items-center">
              <span class="w-24 text-gray-500">描述：</span>
              <span>{{ projectInfo.description }}</span>
            </div>
            <div class="flex items-center">
              <span class="w-24 text-gray-500">作者：</span>
              <span>{{ projectInfo.author }}</span>
            </div>
          </div>
        </div>
      </ElCard>

      <ElDivider />

      <ElCard>
        <template #header>
          <div class="card-header">
            <span class="text-lg font-semibold">核心功能</span>
          </div>
        </template>
        
        <div class="card-content">
          <ElTable :data="features" border style="width: 100%">
            <ElTableColumn prop="id" label="序号" width="80" />
            <ElTableColumn prop="name" label="功能名称" width="180" />
            <ElTableColumn prop="description" label="描述" />
          </ElTable>
        </div>
      </ElCard>

      <div class="mt-8 bg-gray-50 p-6 rounded-lg border border-gray-200">
        <h3 class="text-xl font-semibold mb-4">技术栈</h3>
        <div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4">
          <div class="bg-white p-4 rounded-lg shadow-sm text-center">
            <div class="text-2xl font-bold text-green-600">Vue 3</div>
          </div>
          <div class="bg-white p-4 rounded-lg shadow-sm text-center">
            <div class="text-2xl font-bold text-blue-600">Element Plus</div>
          </div>
          <div class="bg-white p-4 rounded-lg shadow-sm text-center">
            <div class="text-2xl font-bold text-purple-600">Vue Router</div>
          </div>
          <div class="bg-white p-4 rounded-lg shadow-sm text-center">
            <div class="text-2xl font-bold text-yellow-600">Pinia</div>
          </div>
          <div class="bg-white p-4 rounded-lg shadow-sm text-center">
            <div class="text-2xl font-bold text-red-600">Axios</div>
          </div>
          <div class="bg-white p-4 rounded-lg shadow-sm text-center">
            <div class="text-2xl font-bold text-cyan-600">Tailwind CSS</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.about-container {
  width: 100%;
  padding: 20px;
}

.about-header {
  text-align: center;
  margin-bottom: 30px;
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
}
</style>